package io.datastream;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.Scanner;

import org.junit.Test;

public class ScannerFileInput {

	@Test
	public void fileInput() throws FileNotFoundException {
		Scanner scan = new Scanner(new File("b.txt"));
		System.out.println("姓名：");
		String name = scan.next();
		System.out.println("年纪:");
		int age = scan.nextInt();
		System.out.println("性别:");
		String sex = scan.next();
		System.out.println("住址：");
		String addr = scan.next();
		
		System.out.println("=====================");
		System.out.println(name);
		System.out.println(age);
		System.out.println(sex);
		System.out.println(addr);
	}
}
